Skip to content

Verify Windows getCurrent across Flutter hot restarts - #51

Merged
lijy91 merged 1 commit into
mainfrom
fix/issue-49-windows-hot-restart
Nov 22, 2026
Merged

lijy91 merged 1 commit into
mainfrom
fix/issue-49-windows-hot-restart

Conversation

@lijy91

@lijy91 lijy91 commented Nov 21, 2026

Copy link
Copy Markdown
Member

Fixes #49

The implementation fix already on main (nativeapi-core 7b2e366) resolves the current process window when the calling Dart isolate thread has no active HWND. Published cnativeapi 0.6.1 only calls GetActiveWindow(), which can return null after hot restart.

Add an automated regression using the stock Flutter Windows runner and local bindings: startup plus three actual hot restarts must retain the same non-null HWND and window ID. The restarted isolate must cancel one native close, then permit closing and exit cleanly. Add Unreleased entries for the three Dart packages and record the commands/results.

Verified on windows-laptop (Windows x64, Flutter 3.50.0 / Dart 3.14.0): python3 tools/gui/flutter_hot_restart_test.py --host windows-laptop passed all lifecycle checks; Dart analysis and Python compilation passed. Flutter 3.50.1 and physical caption-button clicks were not tested. No API changes or package release.

@lijy91
lijy91 merged commit ff85f4e into main Nov 22, 2026
9 checks passed
@lijy91
lijy91 deleted the fix/issue-49-windows-hot-restart branch November 22, 2026 10:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[window_manager 0.7.0] [Windows] [Flutter 3.50.1] WindowManager.instance.getCurrent() returns null after hot restart

1 participant